package com.etlmaster.core;

import java.io.Serializable;

/**
 * @author Larry
 * @copyright Larry@etlMaster
 * @since 2017-09-10
 */
public class DataSourceDefine implements Serializable {
	private String id, name, driverClassName, url, username, password, dsType,
			jndiName,extProperties,krbconf;
	private String[] alias;

	public DataSourceDefine(String id, String name, String driverClassName,
			String dsType, String url, String username, String password,
			String jndiName, String aliasStr) {
		super();
		this.id = id;
		this.name = name;
		this.driverClassName = driverClassName;

		this.url = url;
		this.username = username == null ? "" : username;
		this.password = password;
		this.jndiName = jndiName;
		this.dsType = dsType;
		if (aliasStr != null && aliasStr.trim().length()>0) {
			this.alias = aliasStr.trim().split(",");
		} else {
			this.alias = new String[0];
		}
	}
	
	public DataSourceDefine(String id, String name, String driverClassName,
			String dsType, String url, String username, String password,
			String jndiName, String aliasStr,String krbconf) {
		super();
		this.id = id;
		this.name = name;
		this.driverClassName = driverClassName;

		this.url = url;
		this.username = username == null ? "" : username;
		this.password = password;
		this.jndiName = jndiName;
		this.dsType = dsType;
		if (aliasStr != null && aliasStr.trim().length()>0) {
			this.alias = aliasStr.trim().split(",");
		} else {
			this.alias = new String[0];
		}
		this.krbconf=krbconf;
	}

	public String getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public String getDriverClassName() {
		return driverClassName;
	}

	public String getUrl() {
		return url;
	}

	public String getUsername() {
		return username;
	}

	public String getPassword() {
		return password;
	}

	public String getDsType() {
		return dsType;
	}

	public String getJndiName() {
		return jndiName;
	}

	public String[] getAlias() {
		return alias;
	}

	public String getExtProperties() {
		return extProperties;
	}

	public void setExtProperties(String extProperties) {
		this.extProperties = extProperties;
	}

	public String getKrbconf() {
		return krbconf;
	}

	public void setKrbconf(String krbconf) {
		this.krbconf = krbconf;
	}


	
	
}